<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        /* inline-block导航间隙的问题
        解决方案：给父元素font-size:0; 
        然后bottom又出现空行
        此时给子a加vertical-align:bottoml*/
    div{
        line-height:50px;
        background: #555;
        font-size: 0;

    }
    a{
        display: inline-block;
        width:120px;
        color: alicebluel;
        text-decoration: none;
        text-align: center;
        border: 0px;
        color:white;
    }
    a:nth-child(1){
        background: blue;
    }
    a:nth-child(2){
        background: red;
    }
    a:nth-child(3){
        background: pink;
    }
    div a{
        font-size: 12px;
        vertical-align:bottom;
    }
    </style>
</head>
<body>
    <div >
        <a href="#">联系客服</a>
        <a href="#">商城</a>
        <a href="#">商品</a>

    </div>
</body>
</html>